home *** CD-ROM | disk | FTP | other *** search
/ MACD 5 / MACD 5.bin / workbench / blankery / bserverdir / sources / clients / blackscreen.c < prev    next >
C/C++ Source or Header  |  1994-11-26  |  1KB  |  67 lines

  1. ;/*
  2. sc BlackScreen.c DATA=FAR NMINC STRMERGE NOSTKCHK IGNORE=73 STRUCTUREEQUIVALENCE NOSTDIO
  3. slink from LIB:c.o BlackScreen.o to //Clients/BlackScreen LIB LIB:sc.lib LIB:amiga.lib /lib/client.lib SC SD STRIPDEBUG NOICONS
  4. delete blackscreen.o
  5. quit
  6.  
  7.  BlackScreen 1.2  (Client for BServer)
  8.  
  9.  Copyright © 1994 Stefano Reksten of 3AM - The Three Amigos!!!
  10.  All rights reserved.
  11. */
  12.  
  13. #include <exec/types.h>
  14. #include <exec/memory.h>
  15.  
  16. #include <clib/exec_protos.h>
  17. #include <clib/intuition_protos.h>
  18. #include <clib/graphics_protos.h>
  19.  
  20. #include "/include/client.h"
  21. #include "/include/client_pragmas.h"
  22.  
  23. struct IntuitionBase *IntuitionBase;
  24. struct GfxBase *GfxBase;
  25. struct DisplayIDInformation *dinfo;
  26.  
  27. void Blank( void )
  28. {
  29. struct Screen *scr;
  30.  
  31. if ( scr = OpenScreenTags( NULL,
  32.     SA_Depth, 0,
  33.     SA_DisplayID, DISPLAYID( dinfo ),
  34.     TAG_END ) )
  35.     {
  36.     register struct ViewPort *vp = &(scr->ViewPort);
  37.  
  38.     SpritesOff();
  39.  
  40.     SetRGB4( vp, 0, 0, 0, 0 );
  41.  
  42.     (void)WaitServerCommand();
  43.     CloseScreen( scr );
  44.     SpritesOn();
  45.     }
  46. else
  47.     SendClientMsg( ACTION_FAILED );
  48. }
  49.  
  50.  
  51. void __main( char *line )
  52. {
  53. if ( IntuitionBase = (struct IntuitionBase *)OpenLibrary( "intuition.library", 37L ) )
  54.     {
  55.     if ( GfxBase = (struct GfxBase *)OpenLibrary( "graphics.library", 37L ) )
  56.         {
  57.         if ( dinfo = OpenCommunication() )
  58.             {
  59.             Blank();
  60.             CloseCommunication( dinfo );
  61.             }
  62.         CloseLibrary( (struct Library *)GfxBase );
  63.         }
  64.     CloseLibrary( (struct Library *)IntuitionBase );
  65.     }
  66. }
  67.